# -*- coding:utf-8 -*-
from Apps.DataGeneration.DataGenerationClass.baseDataGeneration import BaseDataGeneration
import logging,json

logger = logging.getLogger("django")
"""
档案相关
"""


class ArchivesDataGeneration(BaseDataGeneration):
    def __init__(self, *args, **kwargs):
        super(ArchivesDataGeneration, self).__init__(*args, **kwargs)

    def profile(self, args):
        """
        生成一个完整的概要文件。
        :param fields: 如果"fields"不为空，则只返回列表中的字段
        :param sex: “M”是英文“male”的缩写，中文译为男性；“F”是英文“female”的缩写，中文译为女性
        :return:
        """
        fields = None
        sex = "F"
        return json.loads(self.generation.profile(fields=fields, sex=sex))

    def simple_profile(self, args):
        """
        档案(简单)
        :param sex:
        :return:
        """
        sex = None

        return self.generation.simple_profile(sex=sex)
